﻿@{
    ViewBag.Title = "Home Page";
}


@Html.MobileView(@<div style="border:1px solid black;">
			<h1>This is a Mobile View</h1>
			
			<p>
				A mobile view was determined by the browser, and displayed here.
			</p>
		</div>
)

@Html.DesktopView(@<div style="border:1px solid black;">
	<h1>This is a view for a desktop browser.</h1>	

	<p>
		A desktop view was determined by the browser, and displayed here.
	</p>
</div>
)


<h1>ASP.NET Mobile Settings</h1>
<p>
	Is Mobile Browser: @Html.ViewContext.HttpContext.Request.Browser.IsMobileDevice
</p>
<p>
	@this.Html.ViewContext.HttpContext.Request.Browser.ScreenPixelsWidth width / 
	@this.Html.ViewContext.HttpContext.Request.Browser.ScreenPixelsHeight height
</p>


@{
	var device = Html.ViewContext.HttpContext.GetDevice();
}

<h1>Nucleo WURFL</h1>
<p>
	Is Mobile Browser: @Html.ViewContext.HttpContext.Request.IsMobileDeviceRequest()
</p>
<p>
	User Agent: @device.UserAgent
</p>
<p>
	@{ var caps = device.GetCapabilities(); }

	@foreach (var cap in caps)
	 {
		<div>@cap.Key = @cap.Value</div>
	 }
</p>

<h1>Simulate Mobile Device Without Specifics</h1>
<p>
	<form action="@Url.Action("Simulate", "Home")" method="post">
		<input type="submit" value="Switch to mobile" />
	</form>
</p>

